import React from 'react'
import withRouter from '../until/withRouter'
// import {useSelector} from 'react-redux'
function Detail({router}) {
  let {state} = router.location
  // const data = useSelector(state=>{
  //   return state.reducer.dataChild.filter(item=>item.id===router.params.id)

  // })
  console.log(state);
  return (
    <div>
      {/* <img src={data.img}/> */}
      {router.params.id}
      <img src={state.img}/>
    </div>
  )
}

export default withRouter(Detail)